import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import VueLazyload from 'vue-lazyload'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import CacheUtil from '@/utils/CacheUtil';
// 初始化主题
store.dispatch('initTheme')
// 将 CacheUtil 添加到 Vue 原型
Vue.prototype.$cache = CacheUtil;
Vue.use(VueLazyload, {
  preLoad: 1.3,
  attempt: 1,
  observer: true,
  observerOptions: {
    rootMargin: '0px',
    threshold: 0.1
  }
})

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
